{template 'common/header'}
<ul class="nav nav-tabs">
    <li><a href="{php echo  $this->createWebUrl('type', array('name'=>'xm_housekeep_we7'));}">服务类别</a></li>
    <li><a href="{php echo  $this->createWebUrl('typeadd', array('name'=>'xm_housekeep_we7'));}">添加类别</a></li>
	<li><a href="{php echo  $this->createWebUrl('project', array('name'=>'xm_housekeep_we7'));}">类别项目</a></li>
	<li class="active"><a href="{php echo  $this->createWebUrl('projectadd', array('name'=>'xm_housekeep_we7'));}">添加项目</a></li>
</ul>

<div class="clearfix">    
    <form id="theform" class="form form-horizontal" action="{php echo $this->createWebUrl('projecteditok', array('name'=>'xm_housekeep_we7'));}" method="post">
	<input type="hidden" name="id" value="{$item['id']}" />
        <div class="panel panel-default">
            <div class="panel-heading">
                添加服务项目
            </div>
            <div class="panel-body">
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">项目名称</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="name" id="name" value="{$item['name']}" class="form-control">
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">所属类别</label>
                    <div class="col-sm-9 col-xs-12">
                        <select name="type_id" id="type_id" class="form-control  input-s-lg">
                            <option value="">选择所属类别</option>
                            {loop $list $val}
                                <option value="{$val['id']}" {if $item['type_id'] == $val['id']} selected {/if}>{$val['name']}</option>
                            {/loop}
                        </select>
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">显示图标</label>
                    <div class="col-sm-9 col-xs-12">
                        {php echo tpl_form_field_image('icon',$item['icon']);}
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">项目简介</label>
                    <div class="col-sm-9 col-xs-12">
                        <textarea style="height:80px;" class="form-control" name="jianjie" id="jianjie">{$item['jianjie']}</textarea>
						<span class="help-block">对该服务项目的一个简单描述</span>
                    </div>
                </div>
				
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">价格简介</label>
                    <div class="col-sm-9 col-xs-12">
                        <textarea style="height:150px;" class="form-control" name="price" id="price">{$item['price']}</textarea>
						<span class="help-block">对价格一个简单的描述</span>
                    </div>
                </div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">价格详细说明</label>
					
					<div class="col-sm-9 col-xs-12">
						<textarea style="height:350px;" class="richtext-clone" name="price_con" id="price_con">{$item['price_con']}</textarea>
						<span class="help-block">价格的详细说明与规则</span>
					</div>
					<script type="text/javascript">
						require(['jquery', 'util'],function($, util){
							window.editor = util.editor($('.richtext-clone')[0]);
						})
					</script>
				</div>
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">推荐位A</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="istop1" id="istop1" value="{$item[istop1]}" class="form-control">
						<span class="help-block">推荐位A：及在首页的第一排显示的两个家政项目</span>
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">推荐位B</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="istop2" id="istop2" value="{$item[istop2]}" class="form-control">
						<span class="help-block">推荐位B：及在首页的第二排显示的家政项目</span>
                    </div>
                </div>
				
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">显示参数</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="typeorder" id="typeorder" value="{$item[typeorder]}" class="form-control">
						<span class="help-block">显示参数：在统一类别下，数目越小项目显示越靠前</span>
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-md-2 col-lg-1">
                        <input name="submit" type="submit" value="修改" class="btn btn-primary btn-block" />
                        <input type="hidden" name="token" value="{$_W['token']}" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


{template 'common/footer'}